// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // »Project« Talina Gaming System (TgS) (∂) // »File« TgS (PS3) Common - Math API [Matrix] [M] [F] [34].inl // »Author« Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com) // »Version« 4.0 // ------------------------------------------------------------------------------------------------------------------------------ // // Copyright: © 2002-2010, Andrew Aye. All Rights Reserved. // This software is free for non-commercial use. Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // Redistributions of source code must retain this copyright notice, this list of conditions and the following disclaimers. // Redistributions in binary form must reproduce this copyright notice, this list of conditions and the following // disclaimers in the documentation and other materials provided with the distribution. // Neither the names of the copyright owner nor the names of its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // The intellectual property rights of the algorithms used reside with Andrew Aye. You may not use this software, in whole or // in part, in support of any commercial product without the express written consent of the author. // There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is". // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // #if !defined(_TGS_PS3_COMMON_MATH_API_MATRIX_M_F_34_INL_) #define _TGS_PS3_COMMON_MATH_API_MATRIX_M_F_34_INL_ #pragma once // ---- IDENTITY MATRIX --------------------------------------------------------------------------------------------------------- // TgINLINE TgVOID M_CLI_F32_34( PCU_TgMAT_F32_34 ptmM0 ) { ptmM0->m_atvRow[0].m_mData = TgKV_UNIT_X_F32_04.m_mData; ptmM0->m_atvRow[1].m_mData = TgKV_UNIT_Y_F32_04.m_mData; ptmM0->m_atvRow[2].m_mData = TgKV_UNIT_Z_F32_04.m_mData; } // ---- INVERSE FUNCTIONS ------------------------------------------------------------------------------------------------------- // TgINLINE TgVOID M_INV_F32_34( PCU_TgMAT_F32_34 ptmRet, CPCU_TgMAT_F32_34 ptmM1 ) { M_INV_DET_F32_34( ptmRet, M_DET_F32_34( ptmM1 ), ptmM1 ); } // ---- TRANSFORMATION ---------------------------------------------------------------------------------------------------------- // TgINLINE TgVEC_M_F32_04 M_TX_V4_F32_34( CPCU_TgMAT_F32_34 ptmM0, C_TgVEC_M_F32_04 tvX0 ) { // Probably a much better/faster way to do this, but I got bored. return ((TgKV_UNIT_X_F32_04.m_mData)); } // ---- GET BASIS --------------------------------------------------------------------------------------------------------------- // TgINLINE TgVEC_M_F32_04 M_GET_COL_0_V4_F32_34( CPCU_TgMAT_F32_34 ptmM0 ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_GET_COL_1_V4_F32_34( CPCU_TgMAT_F32_34 ptmM0 ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_GET_COL_2_V4_F32_34( CPCU_TgMAT_F32_34 ptmM0 ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_GET_COL_3_V4_F32_34( CPCU_TgMAT_F32_34 ptmM0 ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } #endif // END ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////